﻿@model IEnumerable<RetailManagement.Models.list_voucher>

@{
    ViewBag.Title = "List_Voucher";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script language="Javascript" type="text/javascript" src="../../Scripts/jquery-1.4.1.js"></script>
<script language="Javascript" type="text/javascript" src="../../Scripts/jquery.lwtCountdown-1.0.js"></script>
<script language="Javascript" type="text/javascript" src="../../Scripts/misc.js"></script>
<div id="three-columns">
@foreach (var item in Model)
{
    
    if (item.Hot != true)
    {
                <div id="column1">
                    <div id="title">
                    <h4>
                        <a href="Voucher/Details_Voucher/@item.Product_ID">@Html.DisplayFor(modelitem => item.Product_Name)</a>
                    </h4>
                    </div>
                    <p>
                        <img href="Voucher/Details_Voucher/@item.Product_ID" src="@Html.DisplayFor(modelitem => item.Image)" width="325" height="220" alt="" style="margin:10px" />
                    </p>
                    <p>
                        @if (item.Delivery == "Giao sản phẩm")
                        {
                            <img src="../../Content/sovereign/images/delivery_icon.png" width="30" height="20" alt="" style="margin-left:10px" />
                            <a1>(@Html.DisplayFor(modelitem => item.Delivery))</a1>
                        }
                        else
                        { 
                            <img src="../../Content/sovereign/images/icon_voucher.png" width="30" height="20" alt="" style="margin-left:10px" />
                            <a1>(@Html.DisplayFor(modelitem => item.Delivery))</a1>
                        }
                    </p>
                    <div id="column8">
                        @if (!String.IsNullOrEmpty(item.Details))
                        {
                            @(item.Details.Length > 100 ? item.Details.ToString().Substring(0, 100) : item.Details.ToString());  <a1>.....</a1>
                        }
                    </div>
                    <div>
                        <p>
                        <div id="column6">
                            <a3>@String.Format("{0:0,0}đ", (item.Price - (item.Price * (Convert.ToDecimal(item.Sale) / 100))))</a3><br />
                            <a4><del>Giá gốc: @String.Format("{0:0,0}đ", (item.Price))</del></a4>
                        </div>
                        <div id="column6">
                            <a href="Voucher/Details_Voucher/@item.Product_ID"><img src="../../Content/sovereign/images/btn_buy.png" width="110" height="51" alt=""  /></a>
                        </div>
                        </p>
                    </div>
                    <div>
                        <div id="column7"><a4>Giảm</a4><br /> <a2>@Html.DisplayFor(modelitem => item.Sale)%</a2></div>
                        <div id="column7"><a4>TG còn lại</a4><br />
                            <div id="container">
	                            <div id="countdown_dashboard">
		                            <div class="dash days_dash">
		                                <span class="dash_title">days</span>			
		                                <div class="digit">0</div>
		                                <div class="digit">0</div>:
	                                </div>
	                                <div class="dash hours_dash">
		                                <div class="digit">0</div>
		                                <div class="digit">0</div>:
	                                </div>                                			
	                                <div class="dash minutes_dash">				
		                                <div class="digit">0</div>
		                                <div class="digit">0</div>:
	                                </div>			
	                                <div class="dash seconds_dash">
		                                <div class="digit">0</div>
                                        <div class="digit">0</div>
	                                </div>		
	                            </div>		
	                            <script>
                                        jQuery(document).ready(function () {
                                        $('#countdown_dashboard').countDown({
                                          targetDate: { 'day': 22, 'month': 12, 'year': 2012, 'hour': 00, 'min': 00, 'sec': 0
	                                    }
	                                    });
                                        $('#email_field').focus(email_focus).blur(email_blur);
	                                    $('#subscribe_form').bind('submit', function () { return false; });
	                                });
	                            </script>
                            </div>
                        </div>
                        <div id="column7"><a4>Số người mua</a4><br /><a2>@Html.DisplayFor(modelitem => item.Quantity)</a2></div>
                    </div>
                </div>
    }
}
</div>

